<template>
  <view class="recruit-container">
    <!-- 顶部导航 -->
    <view class="header">
      <view class="back-button" @click="goBack">
        <image class="back-icon" src="/static/back.png"></image>
      </view>
      <text class="page-title">我的招聘</text>
      <view class="company-info-section">
        <image :src="companyInfo.logo || '/static/logo-zgai.png'" class="company-logo" />
        <view class="company-details">
          <text class="company-name">{{ companyInfo.name || '未设置企业信息' }}</text>
          <text class="company-status" @click="goToCompanyDetail(companyInfo.id)" v-if="companyInfo.id">查看详情</text>
        </view>
      </view>
    </view>

    <!-- 招聘主页内容 -->
    <template v-if="!showCompanyDetail">
      <!-- 数据看板 - 简历状态 -->
      <view class="dashboard">
        <view class="dashboard-item" @click="goToResumeTab('all')">
          <view v-if="loadingStats" class="skeleton-num" />
          <template v-else>
            <view class="status-icon all-icon">📋</view>
            <text class="dashboard-number">{{ stats.totalResumes || 0 }}</text>
            <text class="dashboard-label">全部简历</text>
          </template>
        </view>
        <view class="dashboard-item" @click="goToResumeTab('pending')">
          <view v-if="loadingStats" class="skeleton-num" />
          <template v-else>
            <view class="status-icon pending-icon">👀</view>
            <text class="dashboard-number">{{ stats.pendingResumes || 0 }}</text>
            <text class="dashboard-label">待查看</text>
            <view class="badge" v-if="stats.pendingResumes > 0">{{ stats.pendingResumes }}</view>
          </template>
        </view>
        <view class="dashboard-item" @click="goToResumeTab('interview')">
          <view v-if="loadingStats" class="skeleton-num" />
          <template v-else>
            <view class="status-icon interview-icon">🤝</view>
            <text class="dashboard-number">{{ stats.interviewResumes || 0 }}</text>
            <text class="dashboard-label">待面试</text>
            <view class="badge warning" v-if="stats.interviewResumes > 0">{{ stats.interviewResumes }}</view>
          </template>
        </view>
      </view>

      <!-- 功能导航 -->
      <view class="function-nav">
        <view class="nav-item" @click="goToPublish">
          <view class="nav-icon publish-icon">📝</view>
          <text class="nav-text">发布招聘</text>
          <text class="nav-desc">创建新岗位</text>
        </view>
        <view class="nav-item" @click="goToResumeManage">
          <view class="nav-icon resume-icon">📋</view>
          <text class="nav-text">简历管理</text>
          <text class="nav-desc">{{ stats.totalResumes }}份简历</text>
        </view>
        <view class="nav-item" @click="goToSearch">
          <view class="nav-icon search-icon">🔍</view>
          <text class="nav-text">搜索人才</text>
          <text class="nav-desc">主动寻找人才</text>
        </view>
        <view class="nav-item" @click="goToMyJobs">
          <view class="nav-icon analytics-icon">📊</view>
          <text class="nav-text">我发布的</text>
          <text class="nav-desc">查看我发布的简历</text>
        </view>
      </view>

      <!-- 最近活动和快速操作模块已移除 -->
    </template>

    <!-- 快速发布弹窗 -->
  </view>
</template>

<script>
import { fetchRecruitCompanyInfo, fetchRecruitStats, fetchRecruitRecentActivities, createRecruitJob, fetchCompanyDetail } from '../../api/recruit.js'
import { BASE_URL, IS_DEV, SKIP_AUTH_IN_DEV } from '../../api/config.js'
export default {
  data() {
    return {
      companyInfo: {
        id: '', 
        name: '', 
        logo: ''
      },
      stats: {
        activeJobs: 0,
        newResumes: 0,
        pendingResumes: 0,
        totalResumes: 0,
        interviewResumes: 0
      },
      recentActivities: [],
      loadingStats: true,
      loadingActivities: true,
      // 快速发布弹窗
      showQuickPublish: false,
      quickForm: {
        title: '',
        city: '',
        salary: '',
        desc: ''
      },
      submittingQuick: false,
      showCompanyDetail: false,
    }
  },
  
  onLoad(options) {
    this.checkAuth(options)
    this.loadData()
  },
  
  onShow() {
    this.refreshData()
  },
  
  methods: {
    checkAuth(options) {
      const auth = uni.getStorageSync('recruitAuth')
      // 开发预览便捷入口：
      // 1) 路由参数 ?debug=1
      // 2) BASE_URL 为示例域名
      // 3) 开发模式且允许 SKIP_AUTH_IN_DEV
      if (!auth || (IS_DEV && SKIP_AUTH_IN_DEV)) { // 即使auth存在，在开发模式下也强制更新companyId
        if (
          (options && options.debug === '1') ||
          (typeof BASE_URL === 'string' && BASE_URL.includes('api.example.com')) ||
          (IS_DEV && SKIP_AUTH_IN_DEV)
        ) {
          uni.setStorageSync('recruitAuth', {
            inviteCode: 'DEV-DEBUG',
            companyId: 'xiaohongshu_company_id', // 在开发模式下绑定小红书公司ID
            authTime: Date.now()
          })
          return
        }
        uni.redirectTo({
          url: '/pages/recruit/auth'
        })
        return
      }
      
      // 检查认证是否过期（30天）
      const now = Date.now()
      const authTime = auth.authTime
      if (now - authTime > 30 * 24 * 60 * 60 * 1000) {
        uni.removeStorageSync('recruitAuth')
        uni.redirectTo({
          url: '/pages/recruit/auth'
        })
        return
      }
    },
    
    async loadData() {
      await Promise.all([
        this.loadCompanyInfo(),
        this.loadStats(),
        this.loadRecentActivities()
      ])
    },
    
    async loadCompanyInfo() {
      // [接口调用位置] 获取公司信息
      const auth = uni.getStorageSync('recruitAuth');
      if (auth && auth.companyId) {
        const res = await fetchCompanyDetail(auth.companyId);
        if (res.data) { /* 只更新基本信息 */
          this.companyInfo.id = res.data.id;
          this.companyInfo.name = res.data.name;
          this.companyInfo.logo = res.data.logo;
        }
      } else {
        this.companyInfo = { name: '小红书', logo: 'https://img1.baidu.com/it/u=1739539544,3582138974&fm=253&fmt=auto&app=120&f=PNG?w=243&h=243' };
      }
    },
    
    async loadStats() {
      // [接口调用位置] 获取统计
      this.loadingStats = true
      try {
        const data = await fetchRecruitStats()
        this.stats = {
          ...this.stats,
          ...data,
          // 确保有默认值
          totalResumes: data?.totalResumes || 15,
          pendingResumes: data?.pendingResumes || 3,
          interviewResumes: data?.interviewResumes || 2
        }
      } catch (error) {
        console.error('获取统计数据失败:', error)
        // 设置模拟数据
        this.stats = {
          activeJobs: 5,
          newResumes: 8,
          pendingResumes: 3,
          totalResumes: 15,
          interviewResumes: 2
        }
      }
      this.loadingStats = false
    },
    
    async loadRecentActivities() {
      // [接口调用位置] 获取最近活动
      this.loadingActivities = true
      const data = await fetchRecruitRecentActivities()
      this.recentActivities = Array.isArray(data) ? data : []
      this.loadingActivities = false
    },
    
    refreshData() {
      this.loadStats()
      this.loadRecentActivities()
    },
    
    getActivityIcon(type) {
      const iconMap = {
        resume: '',
        job: '💼',
        interview: '🤝',
        system: '🔔'
      }
      return iconMap[type] || '📌'
    },
    
    goToPublish() {
      uni.navigateTo({
        url: '/pages/recruit/publish-job' // 指向新创建的发布招聘页面
      })
    },
    
    goToResumeManage() {
      uni.navigateTo({
        url: '/pages/recruit/resume-manage'
      })
    },
    
    goToResumeTab(tab) {
      // 跳转到简历管理页并定位到对应tab
      uni.navigateTo({
        url: `/pages/recruit/resume-manage?activeTab=${tab}`
      })
    },
    
    goToSearch() {
      uni.navigateTo({
        url: '/pages/recruit/search-resume'
      })
    },
    
    goToAnalytics() {
      uni.navigateTo({
        url: '/pages/recruit/analytics'
      })
    },
    
    goToMyJobs() {
      // 跳转到我的发布页面
      uni.navigateTo({
        url: '/pages/recruit/my-jobs'
      })
    },
    
    goToSettings() {
      uni.navigateTo({
        url: '/pages/recruit/settings'
      })
    },
    
    viewAllActivity() {
      uni.navigateTo({
        url: '/pages/recruit/activity'
      })
    },
    
    handleActivityAction(activity) {
      switch (activity.type) {
        case 'resume':
          uni.navigateTo({
            url: `/pages/recruit/resume-detail?id=${activity.id}`
          })
          break
        case 'job':
          uni.navigateTo({
            url: `/pages/recruit/job-manage?id=${activity.id}`
          })
          break
        case 'interview':
          uni.navigateTo({
            url: `/pages/recruit/interview-detail?id=${activity.id}`
          })
          break
      }
    },
    
    quickPublish() {
      // 打开快速发布弹窗
      this.showQuickPublish = true
    },
    
    quickReview() {
      uni.navigateTo({
        url: '/pages/recruit/quick-review'
      })
    },

    onDashboardClick(type) {
      // 数据卡片点击跳转闭环
      switch (type) {
        case 'activeJobs':
          uni.navigateTo({ url: '/pages/recruit/job-manage' })
          break
        case 'newResumes':
          uni.navigateTo({ url: '/pages/recruit/resume-list?filter=new' })
          break
        case 'pendingResumes':
          uni.navigateTo({ url: '/pages/recruit/resume-list?filter=pending' })
          break
      }
    },

    async submitQuickJob() {
      if (this.submittingQuick) return
      const { title, city, salary } = this.quickForm
      if (!title || !city || !salary) {
        uni.showToast({ title: '请完善岗位名称/城市/薪资', icon: 'none' })
        return
      }
      try {
        this.submittingQuick = true
        // [接口调用位置] 创建岗位
        const res = await createRecruitJob({ ...this.quickForm })
        if (res && res.success) {
          uni.showToast({ title: '发布成功', icon: 'success' })
          this.showQuickPublish = false
          this.quickForm = { title: '', city: '', salary: '', desc: '' }
          // 发布成功后刷新统计与活动，实现闭环
          await Promise.all([this.loadStats(), this.loadRecentActivities()])
        } else {
          uni.showToast({ title: (res && res.message) || '发布失败', icon: 'none' })
        }
      } catch (e) {
        // 错误提示在 http 封装已有
      } finally {
        this.submittingQuick = false
      }
    },
    goBack() {
      uni.navigateBack({ delta: 1 }); // 返回上一级历史页面
    },
    goToCompanyDetail(companyId) {
      uni.navigateTo({
        url: `/pages/recruit/company-detail?id=${companyId}`
      })
    }
  }
}
</script>

<style scoped>
.recruit-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f0f9f4 0%, #e8f5e8 100%);
  padding-bottom: 40rpx;
}

.header {
  position: relative; /* 为返回按钮提供定位上下文 */
  background: transparent;
  padding: 110rpx 36rpx 40rpx; /* 增加头部内边距，给标题更多空间 */
  color: #000000;
  display: flex;
  flex-direction: column;
  justify-content: center; /* 标题居中 */
  align-items: center;
}

.back-button {
  position: absolute;
  top: 98rpx; /* 与header新的padding-top对齐 */
  left: 36rpx; /* 与header的padding-left对齐 */
  z-index: 10;
  width: 64rpx;
  height: 64rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 50%;
  transition: all 0.3s ease;
  border: 1rpx solid rgba(16, 185, 129, 0.2);
}

.back-icon {
  width: 36rpx;
  height: 36rpx;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  filter: brightness(0);
}

.back-button:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.3);
}

.back-icon:active {
  opacity: 1;
}

.page-title {
  font-size: 36rpx;
  font-weight: 700;
  color: #000000;
  text-align: center;
  margin-bottom: 20rpx;
}

.company-info-section {
  flex-direction: row;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  margin-top: 20rpx;
}

.company-logo {
  width: 120rpx;
  height: 120rpx;
  border-radius: 20rpx;
  margin-right: 20rpx;
  background: white;
  box-shadow: 0 8rpx 20rpx rgba(0,0,0,0.12);
  flex-shrink: 0;
  border: 4rpx solid rgba(255,255,255,0.3);
  box-sizing: border-box;
}

.company-details {
  display: flex;
  flex-direction: column; /* 公司名称和查看详情垂直排列 */
  justify-content: flex-start; /* 顶部对齐 */
  margin-left: 0; /* 移除之前左间距 */
  align-items: flex-start; /* 公司名称和查看详情左对齐 */
  flex-grow: 1; /* 占据剩余空间 */
  min-width: 0; /* 允许内容收缩以适应容器 */
}

.company-name {
  font-size: 36rpx;
  font-weight: 600;
  margin-bottom: 8rpx;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.company-status {
  font-size: 24rpx;
  padding: 8rpx 16rpx;
  border-radius: 16rpx;
  align-self: flex-start;
  color: #10b981;
  margin-top: 4rpx;
  white-space: nowrap;
  background: rgba(16, 185, 129, 0.1);
  border: 1rpx solid rgba(16, 185, 129, 0.2);
  transition: all 0.3s ease;
}

.company-status:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: translateY(-2rpx);
  box-shadow: 0 4rpx 12rpx rgba(16, 185, 129, 0.3);
}

.goto-detail-btn {
  /* 已在模板中移除，此处样式不再需要 */
  display: none; 
}

.goto-detail-btn text {
  font-size: 24rpx;
  color: #1f8fff;
  font-weight: 500;
}

.goto-detail-btn .arrow-right {
  font-size: 24rpx;
  margin-left: 8rpx;
}

.settings-btn {
  display: none; /* 隐藏设置按钮 */
}

.settings-icon {
  display: none; /* 隐藏设置按钮 */
}

.dashboard {
  margin: 24rpx 32rpx;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20rpx;
  perspective: 1000rpx;
}

.dashboard-item {
  text-align: center;
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 22rpx;
  padding: 32rpx 16rpx; /* 增加内边距以容纳更大的数字 */
  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.1);
  border: 1rpx solid rgba(16, 185, 129, 0.2);
  transition: all 0.3s ease;
  transform-style: preserve-3d;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180rpx; /* 相应增加高度以容纳更大的数字 */
}

.dashboard-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(4, 194, 164, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.dashboard-item:hover {
  transform: translateY(-8rpx) scale(1.02);
  box-shadow: 0 16rpx 32rpx rgba(16, 185, 129, 0.2);
}

.dashboard-item:hover::before {
  opacity: 1;
}

.skeleton-num {
  width: 120rpx;
  height: 48rpx;
  background: linear-gradient(90deg, #eef2f7 25%, #f5f8fb 37%, #eef2f7 63%);
  background-size: 400% 100%;
  border-radius: 12rpx;
  margin: 0 auto 8rpx;
  animation: shimmer 1.2s infinite;
}

.dashboard-number {
  display: block;
  font-size: 56rpx; /* 从48rpx增大到56rpx */
  font-weight: 800;
  color: #10b981;
  margin-bottom: 10rpx; /* 相应增加底部间距 */
  text-shadow: 0 2rpx 4rpx rgba(16, 185, 129, 0.3);
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
  line-height: 1.1; /* 优化行高 */
}

.dashboard-item:hover .dashboard-number {
  transform: scale(1.1);
}

.dashboard-label {
  font-size: 26rpx;
  color: #000000;
  text-align: center;
  width: 100%;
  line-height: 1.3;
  font-weight: 500;
}

.badge {
  position: absolute;
  top: -6rpx;
  right: -6rpx;
  background: #ff4757;
  color: white;
  font-size: 20rpx;
  padding: 4rpx 8rpx;
  border-radius: 12rpx;
  min-width: 32rpx;
  text-align: center;
  box-shadow: 0 6rpx 16rpx rgba(255, 71, 87, 0.3);
}

.badge.warning {
  background: #ffa502;
}

/* 简历状态图标 */
.status-icon {
  width: 64rpx;
  height: 64rpx;
  border-radius: 20rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32rpx;
  margin: 0 0 16rpx 0;
  transition: all 0.3s ease;
  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.all-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2);
}

.pending-icon {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2);
}

.interview-icon {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2);
}

.dashboard-item:hover .status-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.15);
}

.dashboard-item:hover .all-icon {
  box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.4);
}

.dashboard-item:hover .pending-icon {
  box-shadow: 0 8rpx 24rpx rgba(240, 147, 251, 0.4);
}

.dashboard-item:hover .interview-icon {
  box-shadow: 0 8rpx 24rpx rgba(79, 172, 254, 0.4);
}

.publish-job-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2);
}

.dashboard-item:hover .publish-job-icon {
  box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.4);
}



.function-nav {
  margin: 24rpx 32rpx;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28rpx;
}

.nav-item {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 32rpx;
  padding: 40rpx 28rpx;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 16rpx 48rpx rgba(0, 0, 0, 0.1),
    0 8rpx 24rpx rgba(0, 0, 0, 0.05),
    inset 0 1rpx 0 rgba(255, 255, 255, 0.8);
  border: 2rpx solid rgba(16, 185, 129, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(10rpx);
  min-height: 200rpx;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120rpx;
  background: linear-gradient(135deg, rgba(5, 162, 115, 0.06) 0%, rgba(4, 194, 164, 0.08) 50%, rgba(5, 162, 115, 0.06) 100%);
  border-radius: 32rpx 32rpx 0 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.nav-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
}

.nav-item:hover {
  transform: translateY(-12rpx) scale(1.05) rotateY(5deg);
  box-shadow: 
    0 24rpx 64rpx rgba(16, 185, 129, 0.3),
    0 16rpx 32rpx rgba(16, 185, 129, 0.2),
    0 8rpx 16rpx rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.nav-item:hover::before {
  opacity: 1;
}

.nav-item:hover::after {
  opacity: 1;
}

.nav-icon {
  width: 96rpx;
  height: 96rpx;
  border-radius: 32rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48rpx;
  margin: 0 0 20rpx 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(20rpx);
  position: relative;
  z-index: 3;
  box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.12);
  border: 3rpx solid rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.nav-item:hover .nav-icon {
  transform: translateZ(20rpx) scale(1.2) rotate(10deg);
  box-shadow: 0 16rpx 48rpx rgba(0, 0, 0, 0.2);
}

.publish-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
}

.nav-item:hover .publish-icon {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 16rpx 48rpx rgba(16, 185, 129, 0.4);
}

.resume-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
}

.nav-item:hover .resume-icon {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  box-shadow: 0 16rpx 48rpx rgba(245, 158, 11, 0.4);
}

.search-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
}

.nav-item:hover .search-icon {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 16rpx 48rpx rgba(59, 130, 246, 0.4);
}

.analytics-icon {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
}

.nav-item:hover .analytics-icon {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  box-shadow: 0 16rpx 48rpx rgba(139, 92, 246, 0.4);
}

.nav-text {
  display: block;
  font-size: 32rpx;
  color: #000000;
  font-weight: 800;
  margin-bottom: 12rpx;
  transition: all 0.4s ease;
  transform: translateZ(10rpx);
  position: relative;
  z-index: 3;
  letter-spacing: 0.5rpx;
  text-align: center;
  width: 100%;
  flex-shrink: 0;
}

.nav-item:hover .nav-text {
  color: #333333;
  transform: translateZ(10rpx) scale(1.08);
  text-shadow: 0 4rpx 8rpx rgba(16, 185, 129, 0.4);
}

.nav-desc {
  font-size: 26rpx;
  color: #666666;
  font-weight: 500;
  position: relative;
  z-index: 3;
  transform: translateZ(5rpx);
  transition: all 0.4s ease;
  letter-spacing: 0.3rpx;
  text-align: center;
  width: 100%;
  flex-shrink: 0;
}

.nav-item:hover .nav-desc {
  color: #888888;
  transform: translateZ(5rpx) scale(1.05);
}

.recent-activity {
  margin: 24rpx 32rpx 32rpx;
  background: white;
  border-radius: 24rpx;
  padding: 32rpx;
  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.06);
  border: 1rpx solid #eef2f7;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24rpx;
}

.section-title {
  font-size: 32rpx;
  color: #333;
  font-weight: 600;
}

.view-all {
  font-size: 26rpx;
  color: #333333;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 24rpx;
}

.activity-skeleton {
  display: flex;
  flex-direction: column;
  gap: 16rpx;
}

.activity-skeleton-row {
  height: 88rpx;
  border-radius: 16rpx;
  background: linear-gradient(90deg, #eef2f7 25%, #f5f8fb 37%, #eef2f7 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s infinite;
}

.empty {
  padding: 24rpx 0;
  text-align: center;
  color: #98a1ab;
}

.empty-text {
  font-size: 26rpx;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.activity-item {
  display: flex;
  align-items: center;
  padding: 16rpx 8rpx;
  border-radius: 16rpx;
  background: #f9fbfd;
}

.activity-icon {
  width: 48rpx;
  height: 48rpx;
  border-radius: 12rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24rpx;
  margin-right: 16rpx;
  box-shadow: 0 4rpx 10rpx rgba(0,0,0,0.06);
}

.activity-icon.resume {
  background: #e8f5e8;
}

.activity-icon.job {
  background: #fff3cd;
}

.activity-icon.interview {
  background: #d1ecf1;
}

.activity-content {
  flex: 1;
}

.activity-text {
  display: block;
  font-size: 28rpx;
  color: #2f3a45;
  margin-bottom: 4rpx;
}

.activity-time {
  font-size: 24rpx;
  color: #8a96a3;
}

.activity-action {
  padding: 8rpx 16rpx;
  background: #f0f8ff;
  border-radius: 16rpx;
}

.action-text {
  font-size: 24rpx;
  color: #0066cc;
}

.quick-actions {
  margin: 24rpx 32rpx;
  display: flex;
  gap: 24rpx;
}

.quick-btn {
  flex: 1;
  background: white;
  border: 1rpx solid #eef2f7;
  border-radius: 18rpx;
  padding: 24rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8rpx;
  box-shadow: 0 8rpx 22rpx rgba(0,0,0,0.06);
}

.quick-icon {
  font-size: 32rpx;
}

.quick-text {
  font-size: 26rpx;
  color: #666;
}

/* 快速发布弹窗 */
.modal-mask {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-card {
  width: 88%;
  max-width: 720rpx;
  background: #fff;
  border-radius: 24rpx;
  padding: 28rpx;
  box-shadow: 0 16rpx 40rpx rgba(0, 0, 0, 0.18);
}

.modal-title {
  display: block;
  font-size: 32rpx;
  font-weight: 700;
  color: #2f3a45;
  margin-bottom: 20rpx;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16rpx;
}

.modal-input {
  width: 100%;
  height: 84rpx;
  border: 2rpx solid #e6ebf2;
  border-radius: 16rpx;
  padding: 0 20rpx;
  font-size: 28rpx;
  background: #fff;
}

.modal-textarea {
  width: 100%;
  min-height: 140rpx;
  border: 2rpx solid #e6ebf2;
  border-radius: 16rpx;
  padding: 16rpx 20rpx;
  font-size: 28rpx;
  background: #fff;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16rpx;
  margin-top: 20rpx;
}

.modal-btn {
  min-width: 160rpx;
  height: 80rpx;
  padding: 0 24rpx;
  border-radius: 16rpx;
  border: none;
  font-size: 28rpx;
}

.modal-btn.cancel {
  background: #f2f4f7;
  color: #4b5563;
}

.modal-btn.primary {
  background: linear-gradient(135deg, #05A273 0%, #04C2A4 100%);
  color: #fff;
}
</style>